/**
 * Copyright &copy; 2012-2014 <a href="https://github.com/thinkgem/jeesite">JeeSite</a> All rights reserved.
 */
package cn.knet.sp.ncrm.modules.sys.region.entity;

import com.fasterxml.jackson.annotation.JsonFormat;

import org.hibernate.validator.constraints.Length;

import java.util.Date;

import cn.knet.sp.ncrm.common.persistence.DataEntity;

/**
 * 客户区域Entity
 * @author zhangbin
 * @version 2015-08-27
 */
public class Region extends DataEntity<Region> {
	
	private static final long serialVersionUID = 1L;

	private String number;//用户输入的ID 非用户定义类型下使用
	private String parentId;		// 父亲ID
	private String rankField;		// 暂无
	private String regionLevel;		// 级别
	private String regionName;		// 名称
	private String sortOrder;		// 排序
	private Long version;		// 版本
	private String userType;		// 系统类型
	private Date dateCreated;		// 创建时间
	private Date lastUpdated;		// 修改时间
	private int childs;//孩子节点的个数
	
	public Region() {
		super();
	}

	public Region(String id){
		super(id);
	}


	public String getNumber() {
		return number;
	}

	public void setNumber(String number) {
		this.number = number;
	}

	@Length(min=0, max=32, message="名称长度必须介于 0 和 32 之间")
	public String getRegionName() {
		return regionName;
	}

	public void setRegionName(String regionName) {
		this.regionName = regionName;
	}
	
	public String getSortOrder() {
		return sortOrder;
	}

	public void setSortOrder(String sortOrder) {
		this.sortOrder = sortOrder;
	}

	public Long getVersion() {
		return version;
	}

	public void setVersion(Long version) {
		this.version = version;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getDateCreated() {
		return dateCreated;
	}

	public void setDateCreated(Date dateCreated) {
		this.dateCreated = dateCreated;
	}

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getLastUpdated() {
		return lastUpdated;
	}

	public void setLastUpdated(Date lastUpdated) {
		this.lastUpdated = lastUpdated;
	}

	public String getParentId() {
		return parentId;
	}

	public void setParentId(String parentId) {
		this.parentId = parentId;
	}

	public String getRankField() {
		return rankField;
	}

	public void setRankField(String rankField) {
		this.rankField = rankField;
	}

	public String getRegionLevel() {
		return regionLevel;
	}

	public void setRegionLevel(String regionLevel) {
		this.regionLevel = regionLevel;
	}

	public String getUserType() {
		return userType;
	}

	public void setUserType(String userType) {
		this.userType = userType;
	}

	public int getChilds() {
		return childs;
	}

	public void setChilds(int childs) {
		this.childs = childs;
	}
}